home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2005 August / PCpro_2005_08.ISO / files / freeware / autohot / AutoHotkeyInstall.exe / Extras / Run this to install syntax file for Notepad++.ahk < prev    next >
Encoding:
Text File  |  2005-03-01  |  1.3 KB  |  28 lines

  1. msgbox
  2.  
  3. ;***** AHK-Syntaxfile-Installer for Notepad++
  4. ;***** inkl. Auto-completion-file
  5.  
  6. RegRead, AppData, HKEY_CURRENT_USER, Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders, AppData
  7. RegRead, Notepadpath, HKEY_LOCAL_MACHINE, SOFTWARE\Notepad++
  8. If (Errorlevel=1)
  9.     FileSelectFolder, Notepadpath,, 0, Choose folder: 
  10.  
  11. IfNotExist, %AppData%\Notepad++\
  12.     FileCreateDir, %AppData%\Notepad++
  13. else
  14.     IfNotExist, %AppData%\Notepad++\Backup\
  15.     {
  16.         ; MAKE BACKUP OF EXISTING FILE because there is currently no easy way to avoiding ovewriting the user's
  17.         ; settings with userDefineLang.xml.  This is done only the FIRST time (i.e. if the Backup folder doesn't yet
  18.         ; exist), since subsequent times will just be updates to the files created by a previous run of this script.
  19.         IfExist, %AppData%\Notepad++\userDefineLang.xml
  20.             Addendum = `n`nNote: Notepad++'s *previous* userDefineLang.xml file has been moved into "%AppData%\Notepad++\Backup\" in case you ever want to revert to it.
  21.         FileCreateDir, %AppData%\Notepad++\Backup
  22.         Filecopy, %AppData%\Notepad++\*.*, %AppData%\Notepad++\Backup\
  23.     }
  24.  
  25. Filecopy, %A_ScriptDir%\userDefineLang.xml, %AppData%\Notepad++\, 1
  26. Filecopy, %A_ScriptDir%\AHK Autohotkey.api, %Notepadpath%\plugins\APIs\, 1
  27.  
  28. MsgBox, AHK-Syntaxfile successfully installed!%Addendum%